namespace AakStudio.Shell.UI.Showcase.Views;

public partial class InputFileNameDialog : Window
{
    public string FileName { get; private set; }
    public (int width,int height) PageSize { get; private set; }
    public InputFileNameDialog()
    {
        InitializeComponent();
    }

    private void OnOkButtonClick(object sender, RoutedEventArgs e)
    {
        FileName = FileNameTextBox.Text;
        PageSize=SelectPageSize.SelectedItem switch
        {
            "A4" => (595, 842),
            "A3" => (842, 1191),
            "A2" => (1191, 1684),
            "A1" => (1684, 2384),
            "A0" => (2384, 3370),
            _ => (595, 842)
        };
        DialogResult = true;
    }

    private void OnCancelButtonClick(object sender, RoutedEventArgs e)
    {
        DialogResult = false;
    }
}